package com.ruoyi.eduadmin.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eduadmin.api.EmploymentService;
import com.ruoyi.eduadmin.api.domain.TEmploymentTrace;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class EmploymentServiceFallbackFactory implements FallbackFactory<EmploymentService> {

    @Override
    public EmploymentService create(Throwable cause) {
        return new EmploymentService() {
            @Override
            public AjaxResult addBatch(TEmploymentTrace tEmploymentTrace) {
                return AjaxResult.error(-1,"网络错误！");
            }
        };
    }
}
